﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using Extensions;

public partial class ImageGalery : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        int productId = Request.QueryString["productId"].ToInt32();
        using (DAL.EShopDBDataContext db = new DAL.EShopDBDataContext())
        {
            var product = db.Products.Single(p => p.ProductId == productId);
            ProductTitleLabel.Text = product.Title;
            Page.Title = product.Title;
            DefImage.ImageUrl = string.Format("GetTumbnail.ashx?boxsize=400&fileName={0}", product.ProductImage.Url);
        } 
    }
}
